import com.sun.source.tree.BinaryTree;

public class Test {
    public static void main(String[] args) {
        Binarytree bt = new Binarytree();
        Binarytree.TreeNode root=bt.createTree();
        bt.preOrder(root);
        System.out.println();
        bt.inOrder(root);
        System.out.println();
        bt.postOrder(root);
        System.out.println();
        System.out.println("======节点数打印法一======");
        bt.Size(root);
        System.out.println(bt.nodeSize);
        System.out.println("======节点数打印法二======");
        System.out.println(bt.Size2(root));
        System.out.println("======叶子数打印法一======");
        System.out.println(bt.getLeafNodeCount(root));
        System.out.println("======节点数打印法二======");
        bt.getLeafNodeCount2(root);
        System.out.println(bt.LeafSize);
        System.out.println("======求k层节点个数======");
        System.out.println(bt.getKLevelNodeCount(root, 4));
        System.out.println("======求高度======");
        System.out.println(bt.getHeight(root));
    }
}
